package state

import "fmt"

type noItemState struct {
	vendingMachine *vendingMachine
}

func (n *noItemState) AddItem(count int) error {
	n.vendingMachine.incrementItemCount(count)
	n.vendingMachine.setState(n.vendingMachine.hasItem)
	return nil
}

func (n *noItemState) RequestItem() error {
	return fmt.Errorf("item out of stock")
}

func (n *noItemState) InsertMoney(money int) error {
	return fmt.Errorf("item out of stock")
}

func (n *noItemState) DispenseItem() error {
	return fmt.Errorf("item out of stock")
}

